package team.hyznrj.studentsys.service;

import java.io.IOException;
import java.util.List;

import team.hyznrj.studentsys.entity.DataReport;
import team.hyznrj.studentsys.entity.ExcelAttribute;
import team.hyznrj.studentsys.entity.ExcelStaticParam;
import team.hyznrj.studentsys.entity.WriteExcelConditionEntity;
import team.hyznrj.studentsys.exception.AuthenticationOnFlagException;
import team.hyznrj.studentsys.exception.DataBaseObjectNull;
import team.hyznrj.studentsys.exception.DataNullException;
/**
 * Excel服务
 * 功能:
 * 将Excel数据读入数据库(学生信息、成绩、操行分)
 * TODO 从数据库提取信息写入Excel
 * @author 郑泽锋
 * @date 2018年5月2日
 */
public interface ExcelService {
	/**
	 * 动态生成学生信息表
	 */
	DataReport WriteExcelInStudentMessageDyn(String path,String flag) throws IOException;
	/**
	 * 将指定路径下的EXCEL文件写入学生信息表中
	 * @param excel
	 * @param flag 标识符
	 * @return
	 * @throws DataNullException 
	 * @throws AuthenticationOnFlagException 
	 * @throws DataBaseObjectNull 
	 * @throws Exception 
	 */
	Object saveExcelInStudentMessage(final List<String> path,final String flag) throws DataNullException, DataBaseObjectNull, AuthenticationOnFlagException, Exception;
	/**
	 * 将指定路径下的EXCEL文件写入成绩表中
	 * @param excel
	 * @param flag
	 * @return
	 * @throws AuthenticationOnFlagException 
	 * @throws DataNullException 
	 * @throws Exception 
	 */
	Object saveExcelInGrade(final List<String> path,final String flag) throws DataNullException, AuthenticationOnFlagException, Exception;
	/**
	 * 将指定路径下的EXCEL文件写入操行表中
	 * @param excel
	 * @param flag
	 * @return
	 * @throws Exception 
	 */
	Object saveExcelInQualityMarks (final List<String> path,final String flag) throws Exception;
	/**
	 * 将指定路径下的EXCEL文件写入贫困表
	 * @param path
	 * @param flag
	 * @return
	 * @throws Exception
	 */
	Object saveExcelInPoverty(final List<String> path,final String flag) throws Exception;
	/**
	 * 生成综合测评表
	 * @param conditions
	 * @param param
	 * @param excel
	 * @return
	 * @throws IOException
	 */
	Object WriteExcelWithSGQ(WriteExcelConditionEntity conditions, ExcelAttribute excel,boolean isNewTable)
			throws IOException;
	/***
	 * 生成操行分公示表
	 * @param conditions
	 * @param excel
	 * @return
	 * @throws IOException 
	 */
	Object WriteExcelWithQualityMarks(WriteExcelConditionEntity conditions, ExcelAttribute excel) throws IOException;

	/**
	 * 生成成绩统计表
	 * @param conditions
	 * @param excel
	 * @return
	 * @throws IOException
	 */
	Object WriteExcelWithCourseAchievement(WriteExcelConditionEntity conditions, ExcelAttribute excel) throws IOException;
	/**
	 * 生成学生信息表
	 * @param conditions
	 * @param excel 
	 * @param cloumn 导出的字段列(不可为空)
	 * @return
	 * @throws IOException
	 */
	Object WriteExcelWithStudentMessage(WriteExcelConditionEntity conditions, ExcelAttribute excel, List<String> column,
			List<Integer> columnIndex) throws IOException;
	
}



